<?php
/**
 * Created by PhpStorm.
 * User: w-pc
 * Date: 2017/03/13
 * Time: 17:03
 */
namespace Home\Controller;
use Think\Controller;
class DiaryController extends Controller {
    public function index(){
        $page = request('get','int','page',1);
        if($page==0) $page = 1;
        $diary_list = D('Diary')->get_DiaryList();
        $pageNo = pageNo($diary_list);
        $diary_list = pageList($page,$diary_list);
        $this->assign('diary_list',$diary_list);
        $this->assign('pageNo',$pageNo);
        $this->assign('page',$page);
        $this->display();
    }
}